const express = require("express");
const router = express.Router();

/* GET users listing. */
router.get("/myip", async (_req, res) => {
  // https://uapis.cn/api/myip.php
  const result = await fetch("https://uapis.cn/api/myip.php").then((res) => res.json());
  res.send(result.ip);
});

module.exports = router;
